package com.miracle.java2110.pojo;

import java.util.ArrayList;
import java.util.List;

/**
 * @author rwg
 */
public class DrinksExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Long offset;

    public DrinksExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Long offset) {
        this.offset = offset;
    }

    public Long getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andDidIsNull() {
            addCriterion("did is null");
            return (Criteria) this;
        }

        public Criteria andDidIsNotNull() {
            addCriterion("did is not null");
            return (Criteria) this;
        }

        public Criteria andDidEqualTo(Integer value) {
            addCriterion("did =", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidNotEqualTo(Integer value) {
            addCriterion("did <>", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidGreaterThan(Integer value) {
            addCriterion("did >", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidGreaterThanOrEqualTo(Integer value) {
            addCriterion("did >=", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidLessThan(Integer value) {
            addCriterion("did <", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidLessThanOrEqualTo(Integer value) {
            addCriterion("did <=", value, "did");
            return (Criteria) this;
        }

        public Criteria andDidIn(List<Integer> values) {
            addCriterion("did in", values, "did");
            return (Criteria) this;
        }

        public Criteria andDidNotIn(List<Integer> values) {
            addCriterion("did not in", values, "did");
            return (Criteria) this;
        }

        public Criteria andDidBetween(Integer value1, Integer value2) {
            addCriterion("did between", value1, value2, "did");
            return (Criteria) this;
        }

        public Criteria andDidNotBetween(Integer value1, Integer value2) {
            addCriterion("did not between", value1, value2, "did");
            return (Criteria) this;
        }

        public Criteria andDtypeIsNull() {
            addCriterion("dtype is null");
            return (Criteria) this;
        }

        public Criteria andDtypeIsNotNull() {
            addCriterion("dtype is not null");
            return (Criteria) this;
        }

        public Criteria andDtypeEqualTo(String value) {
            addCriterion("dtype =", value, "dtype");
            return (Criteria) this;
        }

        public Criteria andDtypeNotEqualTo(String value) {
            addCriterion("dtype <>", value, "dtype");
            return (Criteria) this;
        }

        public Criteria andDtypeGreaterThan(String value) {
            addCriterion("dtype >", value, "dtype");
            return (Criteria) this;
        }

        public Criteria andDtypeGreaterThanOrEqualTo(String value) {
            addCriterion("dtype >=", value, "dtype");
            return (Criteria) this;
        }

        public Criteria andDtypeLessThan(String value) {
            addCriterion("dtype <", value, "dtype");
            return (Criteria) this;
        }

        public Criteria andDtypeLessThanOrEqualTo(String value) {
            addCriterion("dtype <=", value, "dtype");
            return (Criteria) this;
        }

        public Criteria andDtypeLike(String value) {
            addCriterion("dtype like", value, "dtype");
            return (Criteria) this;
        }

        public Criteria andDtypeNotLike(String value) {
            addCriterion("dtype not like", value, "dtype");
            return (Criteria) this;
        }

        public Criteria andDtypeIn(List<String> values) {
            addCriterion("dtype in", values, "dtype");
            return (Criteria) this;
        }

        public Criteria andDtypeNotIn(List<String> values) {
            addCriterion("dtype not in", values, "dtype");
            return (Criteria) this;
        }

        public Criteria andDtypeBetween(String value1, String value2) {
            addCriterion("dtype between", value1, value2, "dtype");
            return (Criteria) this;
        }

        public Criteria andDtypeNotBetween(String value1, String value2) {
            addCriterion("dtype not between", value1, value2, "dtype");
            return (Criteria) this;
        }

        public Criteria andDpriceIsNull() {
            addCriterion("dprice is null");
            return (Criteria) this;
        }

        public Criteria andDpriceIsNotNull() {
            addCriterion("dprice is not null");
            return (Criteria) this;
        }

        public Criteria andDpriceEqualTo(Integer value) {
            addCriterion("dprice =", value, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceNotEqualTo(Integer value) {
            addCriterion("dprice <>", value, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceGreaterThan(Integer value) {
            addCriterion("dprice >", value, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceGreaterThanOrEqualTo(Integer value) {
            addCriterion("dprice >=", value, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceLessThan(Integer value) {
            addCriterion("dprice <", value, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceLessThanOrEqualTo(Integer value) {
            addCriterion("dprice <=", value, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceIn(List<Integer> values) {
            addCriterion("dprice in", values, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceNotIn(List<Integer> values) {
            addCriterion("dprice not in", values, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceBetween(Integer value1, Integer value2) {
            addCriterion("dprice between", value1, value2, "dprice");
            return (Criteria) this;
        }

        public Criteria andDpriceNotBetween(Integer value1, Integer value2) {
            addCriterion("dprice not between", value1, value2, "dprice");
            return (Criteria) this;
        }

        public Criteria andDintroduceIsNull() {
            addCriterion("dintroduce is null");
            return (Criteria) this;
        }

        public Criteria andDintroduceIsNotNull() {
            addCriterion("dintroduce is not null");
            return (Criteria) this;
        }

        public Criteria andDintroduceEqualTo(String value) {
            addCriterion("dintroduce =", value, "dintroduce");
            return (Criteria) this;
        }

        public Criteria andDintroduceNotEqualTo(String value) {
            addCriterion("dintroduce <>", value, "dintroduce");
            return (Criteria) this;
        }

        public Criteria andDintroduceGreaterThan(String value) {
            addCriterion("dintroduce >", value, "dintroduce");
            return (Criteria) this;
        }

        public Criteria andDintroduceGreaterThanOrEqualTo(String value) {
            addCriterion("dintroduce >=", value, "dintroduce");
            return (Criteria) this;
        }

        public Criteria andDintroduceLessThan(String value) {
            addCriterion("dintroduce <", value, "dintroduce");
            return (Criteria) this;
        }

        public Criteria andDintroduceLessThanOrEqualTo(String value) {
            addCriterion("dintroduce <=", value, "dintroduce");
            return (Criteria) this;
        }

        public Criteria andDintroduceLike(String value) {
            addCriterion("dintroduce like", value, "dintroduce");
            return (Criteria) this;
        }

        public Criteria andDintroduceNotLike(String value) {
            addCriterion("dintroduce not like", value, "dintroduce");
            return (Criteria) this;
        }

        public Criteria andDintroduceIn(List<String> values) {
            addCriterion("dintroduce in", values, "dintroduce");
            return (Criteria) this;
        }

        public Criteria andDintroduceNotIn(List<String> values) {
            addCriterion("dintroduce not in", values, "dintroduce");
            return (Criteria) this;
        }

        public Criteria andDintroduceBetween(String value1, String value2) {
            addCriterion("dintroduce between", value1, value2, "dintroduce");
            return (Criteria) this;
        }

        public Criteria andDintroduceNotBetween(String value1, String value2) {
            addCriterion("dintroduce not between", value1, value2, "dintroduce");
            return (Criteria) this;
        }

        public Criteria andDquantityIsNull() {
            addCriterion("dquantity is null");
            return (Criteria) this;
        }

        public Criteria andDquantityIsNotNull() {
            addCriterion("dquantity is not null");
            return (Criteria) this;
        }

        public Criteria andDquantityEqualTo(Integer value) {
            addCriterion("dquantity =", value, "dquantity");
            return (Criteria) this;
        }

        public Criteria andDquantityNotEqualTo(Integer value) {
            addCriterion("dquantity <>", value, "dquantity");
            return (Criteria) this;
        }

        public Criteria andDquantityGreaterThan(Integer value) {
            addCriterion("dquantity >", value, "dquantity");
            return (Criteria) this;
        }

        public Criteria andDquantityGreaterThanOrEqualTo(Integer value) {
            addCriterion("dquantity >=", value, "dquantity");
            return (Criteria) this;
        }

        public Criteria andDquantityLessThan(Integer value) {
            addCriterion("dquantity <", value, "dquantity");
            return (Criteria) this;
        }

        public Criteria andDquantityLessThanOrEqualTo(Integer value) {
            addCriterion("dquantity <=", value, "dquantity");
            return (Criteria) this;
        }

        public Criteria andDquantityIn(List<Integer> values) {
            addCriterion("dquantity in", values, "dquantity");
            return (Criteria) this;
        }

        public Criteria andDquantityNotIn(List<Integer> values) {
            addCriterion("dquantity not in", values, "dquantity");
            return (Criteria) this;
        }

        public Criteria andDquantityBetween(Integer value1, Integer value2) {
            addCriterion("dquantity between", value1, value2, "dquantity");
            return (Criteria) this;
        }

        public Criteria andDquantityNotBetween(Integer value1, Integer value2) {
            addCriterion("dquantity not between", value1, value2, "dquantity");
            return (Criteria) this;
        }

        public Criteria andDphotoIsNull() {
            addCriterion("dphoto is null");
            return (Criteria) this;
        }

        public Criteria andDphotoIsNotNull() {
            addCriterion("dphoto is not null");
            return (Criteria) this;
        }

        public Criteria andDphotoEqualTo(String value) {
            addCriterion("dphoto =", value, "dphoto");
            return (Criteria) this;
        }

        public Criteria andDphotoNotEqualTo(String value) {
            addCriterion("dphoto <>", value, "dphoto");
            return (Criteria) this;
        }

        public Criteria andDphotoGreaterThan(String value) {
            addCriterion("dphoto >", value, "dphoto");
            return (Criteria) this;
        }

        public Criteria andDphotoGreaterThanOrEqualTo(String value) {
            addCriterion("dphoto >=", value, "dphoto");
            return (Criteria) this;
        }

        public Criteria andDphotoLessThan(String value) {
            addCriterion("dphoto <", value, "dphoto");
            return (Criteria) this;
        }

        public Criteria andDphotoLessThanOrEqualTo(String value) {
            addCriterion("dphoto <=", value, "dphoto");
            return (Criteria) this;
        }

        public Criteria andDphotoLike(String value) {
            addCriterion("dphoto like", value, "dphoto");
            return (Criteria) this;
        }

        public Criteria andDphotoNotLike(String value) {
            addCriterion("dphoto not like", value, "dphoto");
            return (Criteria) this;
        }

        public Criteria andDphotoIn(List<String> values) {
            addCriterion("dphoto in", values, "dphoto");
            return (Criteria) this;
        }

        public Criteria andDphotoNotIn(List<String> values) {
            addCriterion("dphoto not in", values, "dphoto");
            return (Criteria) this;
        }

        public Criteria andDphotoBetween(String value1, String value2) {
            addCriterion("dphoto between", value1, value2, "dphoto");
            return (Criteria) this;
        }

        public Criteria andDphotoNotBetween(String value1, String value2) {
            addCriterion("dphoto not between", value1, value2, "dphoto");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}